package com.stagewebserver.webserver.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.stagecommon.common.pojo.DemandReceive;
import com.stagecommon.common.pojo.RespBean;
import com.stagewebserver.webserver.mapper.DemandReceiveMapper;
import com.stagewebserver.webserver.service.DemandReceiveService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: yxl
 * @since: 2022-01-04
 **/
@Service
@Slf4j
public class DemandReceiveServiceImpl extends ServiceImpl<DemandReceiveMapper, DemandReceive> implements DemandReceiveService {

    @Autowired
    private DemandReceiveMapper demandReceiveMapper;

    @Override
    public RespBean<Integer> insertDemandReceive(DemandReceive demandReceive) {
        if (demandReceiveMapper.insert(demandReceive) == 1){
            return RespBean.operationSuccess("插入成功",200,1);
        }
        else{
            return RespBean.operationFail("插入失败");
        }
    }


}
